package evolutionaryballoons.behavior.genetic;


public class Program implements Comparable<Program> {
	protected Node rootNode;
	protected int pointsCollected;
	protected int spentTicks;
	protected int numberOfNodes;
	protected int cost;
	
	public int compareTo(Program program) {
		if (program.pointsCollected != pointsCollected) {
			return program.pointsCollected - pointsCollected;
		} else if (program.cost != cost) {
			return cost - program.cost;
		} else if (program.numberOfNodes != numberOfNodes) {
			return numberOfNodes - program.numberOfNodes;
		} else {
			return spentTicks - program.spentTicks;
		}
	}
}
